#include<ros/ros.h>
#include<demo_video_processing/pointinfo.h>
#include<opencv2/opencv.hpp>
#include<stdio.h>
using namespace std;
using namespace cv;
demo_video_processing::pointinfo received_pInfo;
void msgCallback(const demo_video_processing::pointinfo::ConstPtr &msg)
{
    ROS_INFO("this package has %d points,",msg->number);
    for(int ai=0;ai<msg->number;ai++)
    {
        printf("%d",msg->points[ai].id);
        cout<<","<<msg->points[ai].xaxis<<","<<msg->points[ai].yaxis<<endl;
    }
    cout<<endl;
}

int main(int argc,char ** argv)
{
  ros::init(argc,argv,"test1");
  ros::NodeHandle n;
  ros::Subscriber msg_sub = n.subscribe("axis", 10, msgCallback);
  ros::Rate loop_rate2(30);
  while(ros::ok())
  {
  ros::spinOnce();
  loop_rate2.sleep();
  }
  return 0;
}
